<?php
namespace Ccc\Gal\Domain\Model;

/*                                                                        *
 * This script belongs to the FLOW3 package "Ccc.Gal".                    *
 *                                                                        *
 *                                                                        */

use TYPO3\FLOW3\Annotations as FLOW3;
use Doctrine\ORM\Mapping as ORM;

/**
 * A Image
 *
 * @FLOW3\Entity
 */
class Image {
	
	/**
	 * @var \Ccc\Gal\Domain\Model\Gallery
	 * @ORM\ManyToOne(inversedBy="images")
	 */
	protected $gallery = '';
	
	/**
	 * The imagedescription.
	 *
	 * @var string
	 * @FLOW3\Validate(type="NotEmpty")
	 * @FLOW3\Validate(type="Text")
	 * @FLOW3\Validate(type="StringLength", options={ "minimum"=2, "maximum"=80 })
	 * @ORM\Column(length=80)
	 */
	protected $imagedescription = '';
	
	/**
	 * @var \TYPO3\FLOW3\Resource\Resource
	 * @ORM\ManyToOne
	 * FLOW3\Validate(type="NotEmpty")
	 */
	protected $originalResource;
	
	/**
	 * Returns the Gallery this image is part of
	 *
	 * @param \Ccc\Gal\Domain\Model\Gallery $gallery The gallery
	 * @return void
	 */
	public function setGallery($gallery) {
		$this->gallery = $gallery;
	}
	
	/**
	 * Returns the gallery this image is part of
	 *
	 * @return \Ccc\Gal\Domain\Model\Gallery The gallery this image is part of
	 */
	public function getGallery() {
		return $this->gallery;
	}
	
	/**
	 * Set Imagedescription
	 *
	 * @param string $imagedescription The Images Name
	 * @return void
	 */
	public function setImagedescription($imagedescription) {
		$this->imagedescription = $imagedescription;
	}
	
	/**
	 * Set Imagedescription
	 *
	 * @param string imagedescription The Images Name
	 * @return void
	 */
	public function getImagedescription() {
		return $this->imagedescription;
	}
	
	/**
	 * Sets the original resource
	 *
	 * @param \Ccc\Gal\Resource\Resource $originalResource
	 * @return void
	 */
	public function setOriginalResource(\TYPO3\FLOW3\Resource\Resource $originalResource) {
		$this->originalResource = $originalResource;
	}

	/**
	 * Returns the original resource
	 *
	 * @return \Ccc\Gal\Resource\Resource $originalResource
	 */
	public function getOriginalResource() {
		return $this->originalResource;
	}

}
?>